<!DOCTYPE html>

<html lang="zh-CN">
	<head>
		<meta charset="utf-8" />
		<meta name="renderer" content="webkit" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		<title>后台登陆</title>
		<script src="/static/js/jquery-1.9.1.min.js"></script>
        <script src="/static/bootstrap.modal/bootstrap.js"></script>
        <script src="/static/js/base.js"></script>
        <script src="/static/js/avalon.js"></script>
        <script src="/static/js/eqx.js"></script>
        <script src="/static/js/goods/jquery.colorbox-min.js"></script>
        <script src="/static/js/goods/zzsc.js"></script>
		
		
        <link media="all" href="/static/bootstrap.modal/bootstrap.min.css" rel="stylesheet">
        <link media="all" href="/static/css/main.css" rel="stylesheet">
        <link media="all" href="/static/css/base.hy.css" rel="stylesheet">
        <link media="all" href="/static/css/goods.css" rel="stylesheet">
		
		<style type="text/css">
			.dlk{height:515px;z-index: 999;display: block;position: absolute;top:17%;}
			.input_wrp{margin:0 auto 30px auto;display:block;border:1px solid #e8e8e8;}

			.input_wrp input{width:319px;height:38px;border:0;outline:none;padding-left: 49px}
			.input_wrp .icon{margin:5px 0px 0 10px; border:none;position: absolute;}
			.abtn_login{ outline:none;border:0;margin:30px auto;width:370px;display:block;font-size:16px;height:40px;line-height:40px;color:#fff;background-color:#f75b49;}
			.abtn_login:hover{color:#fff;text-decoration: none;}
			.logn_border{margin:0 0px 97px 0px;display:block;height: 46px;text-align: center;}

			.username,.password{text-align: left;}
			.icon1{margin-left:-5px;}
			.login_mask{width: 100%;z-index: 1;position: absolute;}
			.img_height{width:100%;position:absolute}
		</style>

		
	</head>
<body>

<form class="dlk demoform" id="dlk" onsubmit="return false;" >
	<div class="input_wrp" style="border:1px #242A30 solid">
		<i class="icon "><img src="/static/images/admin/user_ht.png" alt=""  /></i>
		<input type="text"  name="username" class="username" placeholder="请输入用户名" onkeyup="filterUsername(this)"/>
	</div>
	<div class="input_wrp" style="border:1px #DFDFDF solid">
		<i class="icon "><img class="icon1" src="/static/images/admin/mm_icon.png" alt="" /></i>
		<input type="password" name="password" class="password" placeholder="请输入密码"/>
	</div>
	<input  value="登陆" type="submit"  class="abtn_login">
</form>
<div class='login_mask'></div>
<script>
	function filterUsername(input){
		var v,rv;
		v = input.value;
		if(typeof v=='string' && v.length>0){
			rv = v.replace(/[^\w]/g, '');
			input.value = rv;
		}
		return true;
	}
	$('.abtn_login').click(function(event) {
		var password = $('.password').val();
		var username = $('.username').val();
		$.post('/login', {password:password,username:username}, function(json) {
			if(json.Id!=0){
				location.href = '/user_list.html';
			}else{
				AlterTip.alert('用户名或密码错误！请重新登录');
			}
		},'json');
	});

	//蒙版高度
	var imgNum=$('.img_height').length;
	$('.img_height').load(function(){
	    if(!--imgNum){
	        var img_height = $('.img_height').height();
			$('.login_mask').height(img_height);
	    }
	});

	//登录窗口响应式居中
	$(window).resize(function(){ 
		$('.dlk').css({ 
			position:'absolute', 
			left: ($(window).width() - $('.dlk').outerWidth())/2
		}); 
	}); 
	$(window).resize(); 
</script>
</body>
</html>
